package com.fdd.op.sdk.request.api.account;

import com.fdd.op.sdk.ApiRuleException;
import com.fdd.op.sdk.BaseFddRequest;
import com.fdd.op.sdk.constants.Constants;
import com.fdd.op.sdk.internal.mapping.RequestField;
import com.fdd.op.sdk.internal.util.FddHashMap;
import com.fdd.op.sdk.response.api.account.CreateAccountResponse;

import java.util.Map;

public class CreateAccountRequest extends BaseFddRequest<CreateAccountResponse> {
    @Override
    public String getApiMethodName() {
        return "/user/api/account/createAccount";
    }

    @Override
    public String getHttpMethod() {
        return Constants.METHOD_POST;
    }

    @Override
    public Map<String, Object> getTextParams() {
        FddHashMap txtParams = new FddHashMap();
        if(this.udfParams != null) {
            txtParams.putAll(this.udfParams);
        }
        return txtParams;
    }

    @Override
    public Class<CreateAccountResponse> getResponseClass() {
        return CreateAccountResponse.class;
    }

    @Override
    public void check() throws ApiRuleException {

    }

    @RequestField("用户姓名，初始化的用户名称，实名认证之后则以实名的为准")
    private String userName;

    @RequestField("手机号区号，非必传，默认+86，传参时需带“+”号")
    private String areaCode;

    @RequestField("用户手机号，手机号码和邮箱不能同时为空")
    private String mobile;

    @RequestField("用户邮箱，手机号码和邮箱不能同时为空")
    private String email;

    @RequestField("用户在第三方业务系统的唯一标识")
    private String tpAccountId;

    @RequestField("用户所属企业在当前系统的唯一标识，可传入多个，用英文逗号分隔")
    private String companyIds;

    @RequestField("用户所属企业在第三方业务系统的唯一标识，可传入多个，用英文逗号分隔")
    private String tpOrgIds;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTpAccountId() {
        return tpAccountId;
    }

    public void setTpAccountId(String tpAccountId) {
        this.tpAccountId = tpAccountId;
    }

    public String getCompanyIds() {
        return companyIds;
    }

    public void setCompanyIds(String companyIds) {
        this.companyIds = companyIds;
    }

    public String getTpOrgIds() {
        return tpOrgIds;
    }

    public void setTpOrgIds(String tpOrgIds) {
        this.tpOrgIds = tpOrgIds;
    }
}
